package com.gitee.feizns.web.dao.handler.meta;

import com.gitee.feizns.bean.Property;
import com.gitee.feizns.web.dao.handler.meta.annotation.Now;

import java.util.Date;

/**
 * @author feizns
 * @since 2019/7/25
 */
public class CreatedAtAutoFillHandler extends AbstractGeneralFillInputHandler {

    @Override
    protected void handle(Property prop, Object original) {
        if ( prop.isAnnotationPresent(Now.class) )
            prop.set(new Date());
    }

}
